#pragma once
#include "NetDef.h"

class CBaseMessage
{
public:
	CBaseMessage(DWORD type);
	CBaseMessage(){};
	~CBaseMessage(void);
	void Add(char* str);
	void Add(long Val);
	void Add(BYTE Val);
	DWORD GetDWORD();
	void  GetStr(char* buffer,DWORD dwsize);
	void Send();
	void SetType(DWORD dwType);
	void SetData(BYTE* buffer,DWORD dwSize);
	BYTE* GetData()	{return m_Data._pMsgData;}
	DWORD GetSize()	{return m_Data._dwWritePos;}
	virtual void Run()=0;
private:
	
	DWORD m_dwType;
	tagData m_Data;
};
